package com.oamicnet;

import com.oamicnet.entity.Student;
import com.oamicnet.service.StudentService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Hello world!
 */
public class App {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        StudentService studentService = context.getBean("studentService", StudentService.class);
        studentService.save(new Student(1, "zhangsan", "123"));
        studentService.update(new Student(1, "zhangsan", "123"));
    }
}
